package com.xzzz.irda.guardcat.core.metric.tomcat;

/**
 * Tomcat 连接器信息
 *
 * @author xzzz
 * @since 1.0.0
 */
public class TomcatConnectorInfo {
    /**
     * 【通用属性】Tomcat 端口号
     *
     * 如果使用特殊值0（零），则 Tomcat 将随机选择一个空闲端口用于此连接器。
     * 这通常仅在嵌入式和测试应用程序中有用。
     */
    private Integer port;

    /**
     * 解码 URI 字符的编码字符集合
     */
    private String uriEncoding;

    /**
     * 协议名称（http、https）
     */
    private String scheme;

    /**
     * 协议类型
     */
    private String protocol;

    /**
     * 协议处理器类名
     */
    private String protocolHandlerClassName;

    /**
     * 最大请求队列长度
     */
    private Integer acceptCount;

    /**
     * 【标准 http 属性】连接器在接受连接后将等待呈现请求 URI 行的毫秒数。
     */
    private Integer connectionTimeout;

    /**
     * 最大请求处理线程数, 默认值 200 。
     */
    private Integer maxThreads;

    /**
     * 最小备用请求处理线程数【核心线程数】默认值 10 。
     */
    private Integer minSpareThreads;

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getUriEncoding() {
        return uriEncoding;
    }

    public void setUriEncoding(String uriEncoding) {
        this.uriEncoding = uriEncoding;
    }

    public String getScheme() {
        return scheme;
    }

    public void setScheme(String scheme) {
        this.scheme = scheme;
    }

    public String getProtocol() {
        return protocol;
    }

    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }

    public String getProtocolHandlerClassName() {
        return protocolHandlerClassName;
    }

    public void setProtocolHandlerClassName(String protocolHandlerClassName) {
        this.protocolHandlerClassName = protocolHandlerClassName;
    }

    public Integer getAcceptCount() {
        return acceptCount;
    }

    public void setAcceptCount(Integer acceptCount) {
        this.acceptCount = acceptCount;
    }

    public Integer getConnectionTimeout() {
        return connectionTimeout;
    }

    public void setConnectionTimeout(Integer connectionTimeout) {
        this.connectionTimeout = connectionTimeout;
    }

    public Integer getMaxThreads() {
        return maxThreads;
    }

    public void setMaxThreads(Integer maxThreads) {
        this.maxThreads = maxThreads;
    }

    public Integer getMinSpareThreads() {
        return minSpareThreads;
    }

    public void setMinSpareThreads(Integer minSpareThreads) {
        this.minSpareThreads = minSpareThreads;
    }

    @Override
    public String toString() {
        return "TomcatConnectorInfo{" +
                "port=" + port +
                ", uriEncoding='" + uriEncoding + '\'' +
                ", scheme='" + scheme + '\'' +
                ", protocol='" + protocol + '\'' +
                ", protocolHandlerClassName='" + protocolHandlerClassName + '\'' +
                ", acceptCount=" + acceptCount +
                ", connectionTimeout=" + connectionTimeout +
                ", maxThreads=" + maxThreads +
                ", minSpareThreads=" + minSpareThreads +
                '}';
    }
}
